// import axios from 'axios';
import fkaxios from '../index'
export function getStorelistData(){
    return fkaxios.get({
        url:"/shop/shopMapData"
    })
}

export function getFoodlabelData(){
    return fkaxios.get({
        url:"/shop/foodlabel"
    })
}

export function getFoodData(){
    return fkaxios.get({
        url:"/shop/food"
    })
}

export function addStoreData(data){
    console.log('调用到我了');
    return fkaxios.post({
        url:'/shop/addShoreData',
        data
    })
}

export function getStoreDetailData(id,search = ''){
    return fkaxios.get({
        url:"/shop/ShopAllData",
        params:{
            id,
            search
        }
    })
}

export function deleteSHOP(id){
    return fkaxios.get({
        url:"/shop/deleteShop",
        params:{
            id
        }
    })
}

export function FoodStatusChange(id,status){
    return fkaxios.get({
        url:"/shop/FoodStatusChange",
        params:{
            id,
            status
        }
    })
}
export function addNewFood(data){
    return fkaxios.post({
        url:"/shop/addNewFood",
        data
    })
}

export function deleteFood(_id){
    return fkaxios.get({
        url:"/shop/deleteFoodData",
        params:{
            _id
        }
    })
}

export function getCoupon(){
    return fkaxios.get({
        url:"/users/getCoupon"
    })
}

export function addCouponAjax(obj){
    return fkaxios.post({
        url:"/users/addCoupon",
        data:{
            ...obj
        }
    })
}

export function deleteCouponData(id){
    return fkaxios.get({
        url:'/users/deleteCouponData',
        params:{
            id
        }
    })
}

export function ChangeCouponAjax(params){
    return fkaxios.get({
        url:"/users/ChangeCoupon",
        params
    })
}

// 修改商品属性
export function UpdataFoodListInfo(params){
    return fkaxios.get({
        url:"/shop/updataFoodListInfo",
        params
    })
}

